home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / OCEMail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  49.2 KB  |  1,583 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCEMail.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __OCEMAIL__
  19. #define __OCEMAIL__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __FILES__
  25. #include <Files.h>
  26. #endif
  27. #ifndef __TEXTEDIT__
  28. #include <TextEdit.h>
  29. #endif
  30.  
  31. #ifndef __DIGITALSIGNATURE__
  32. #include <DigitalSignature.h>
  33. #endif
  34. #ifndef __OCE__
  35. #include <OCE.h>
  36. #endif
  37. #ifndef __OCEAUTHDIR__
  38. #include <OCEAuthDir.h>
  39. #endif
  40. #ifndef __OCEMESSAGING__
  41. #include <OCEMessaging.h>
  42. #endif
  43.  
  44.  
  45.  
  46. #if PRAGMA_ONCE
  47. #pragma once
  48. #endif
  49.  
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53.  
  54. #if PRAGMA_IMPORT
  55. #pragma import on
  56. #endif
  57.  
  58. #if PRAGMA_STRUCT_ALIGN
  59.     #pragma options align=mac68k
  60. #elif PRAGMA_STRUCT_PACKPUSH
  61.     #pragma pack(push, 2)
  62. #elif PRAGMA_STRUCT_PACK
  63.     #pragma pack(2)
  64. #endif
  65.  
  66. /**************************************************************************************/
  67. /* Common Definitions */
  68. /**************************************************************************************/
  69.  
  70. /* reference to a new or open letter or message */
  71. typedef long                             MailMsgRef;
  72. /* reference to an open msam queue */
  73. typedef long                             MSAMQueueRef;
  74. /* identifies slots managed by a PMSAM */
  75. typedef unsigned short                     MSAMSlotID;
  76. /* reference to an active mailbox */
  77. typedef long                             MailboxRef;
  78. /* identifies slots within a mailbox */
  79. typedef unsigned short                     MailSlotID;
  80. /* identifies a letter in a mailbox */
  81. struct MailSeqNum {
  82.     MailSlotID                         slotID;
  83.     long                             seqNum;
  84. };
  85. typedef struct MailSeqNum MailSeqNum;
  86.  
  87. /* A MailBuffer is used to describe a buffer used for an IO operation.
  88. The location of the buffer is pointed to by 'buffer'. 
  89. When reading, the size of the buffer is 'bufferSize' 
  90. and the size of data actually read is 'dataSize'.
  91. When writing, the size of data to be written is 'bufferSize' 
  92. and the size of data actually written is 'dataSize'.
  93. */
  94. struct MailBuffer {
  95.     long                             bufferSize;
  96.     void *                            buffer;
  97.     long                             dataSize;
  98. };
  99. typedef struct MailBuffer MailBuffer;
  100.  
  101. /* A MailReply is used to describe a commonly used reply buffer format.
  102. It contains a count of tuples followed by an array of tuples.
  103. The format of the tuple itself depends on each particular call.
  104. */
  105. struct MailReply {
  106.     unsigned short                     tupleCount;
  107.                                                                 /* tuple[tupleCount] */
  108. };
  109. typedef struct MailReply MailReply;
  110.  
  111. /* Shared Memory Communication Area used when Mail Manager sends 
  112. High Level Events to a PMSAM. 
  113. */
  114. struct SMCA {
  115.     unsigned short                     smcaLength;                    /* includes size of smcaLength field */
  116.     OSErr                             result;
  117.     long                             userBytes;
  118.     union {
  119.         CreationID                         slotCID;                /* for create/modify/delete slot calls */
  120.         long                             msgHint;                /* for kMailEPPCMsgOpened */
  121.     } u;
  122. };
  123. typedef struct SMCA SMCA;
  124.  
  125. /**************************************************************************************/
  126. /* Value of creator and types fields for messages and blocks defined by MailManager */
  127.  
  128. enum {
  129.     kMailAppleMailCreator        = FOUR_CHAR_CODE('apml'),        /* message and letter block creator */
  130.     kMailLtrMsgType                = FOUR_CHAR_CODE('lttr'),        /* message type of letters, reports */
  131.     kMailLtrHdrType                = FOUR_CHAR_CODE('lthd'),        /* contains letter header */
  132.     kMailContentType            = FOUR_CHAR_CODE('body'),        /* contains content of letter */
  133.     kMailEnclosureListType        = FOUR_CHAR_CODE('elst'),        /* contains list of enclosures */
  134.     kMailEnclosureDesktopType    = FOUR_CHAR_CODE('edsk'),        /* contains desktop mgr info for enclosures */
  135.     kMailEnclosureFileType        = FOUR_CHAR_CODE('asgl'),        /* contains a file enclosure, format is defined by AppleSingle */
  136.     kMailImageBodyType            = FOUR_CHAR_CODE('imag'),        /* contains image of letter */
  137.     kMailMSAMType                = FOUR_CHAR_CODE('gwyi'),        /* contains msam specific information */
  138.     kMailTunnelLtrType            = FOUR_CHAR_CODE('tunl'),        /* used to read a tunnelled message */
  139.     kMailHopInfoType            = FOUR_CHAR_CODE('hopi'),        /* used to read hopInfo for a tunnelled message */
  140.     kMailReportType                = FOUR_CHAR_CODE('rpti'),        /* contains report info */
  141.     kMailFamily                    = FOUR_CHAR_CODE('mail'),        /* Defines family of "mail" msgs: content, header, etc */
  142.     kMailFamilyFile                = FOUR_CHAR_CODE('file')        /* Defines family of "direct display" msgs */
  143. };
  144.  
  145. /*    
  146. kMailImageBodyType:
  147.     format is struct TPfPgDir - in Printing.h
  148.     *    struct TPfPgDir {
  149.     *        short    pageCount;        - number of pages in the image.
  150.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  151.     *                                - to image of page n.
  152.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  153.  
  154. kMailReportType:
  155. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  156. This block has a header, IPMReportBlockHeader,
  157. followed by an array of elements, each of type IPMRecipientReport
  158.  
  159. Various families used by mail or related msgs
  160. */
  161.  
  162.  
  163. /**************************************************************************************/
  164. typedef unsigned short                     MailAttributeID;
  165. /* Values of MailAttributeID */
  166. /* Message store attributes - stored in the catalog */
  167. /* Will always be present in a letter and have fixed sizes */
  168.  
  169. enum {
  170.     kMailLetterFlagsBit            = 1,                            /* MailLetterFlags */
  171.                                                                 /* Letter attributes - stored in the letter will always be present in a letter and have fixed sizes */
  172.     kMailIndicationsBit            = 3,                            /* MailIndications */
  173.     kMailMsgTypeBit                = 4,                            /* OCECreatorType */
  174.     kMailLetterIDBit            = 5,                            /* MailLetterID */
  175.     kMailSendTimeStampBit        = 6,                            /* MailTime */
  176.     kMailNestingLevelBit        = 7,                            /* MailNestingLevel */
  177.     kMailMsgFamilyBit            = 8,                            /* OSType */
  178.                                                                 /* Letter attributes - stored in the letter may be present in a letter and have fixed sizes */
  179.     kMailReplyIDBit                = 9,                            /* MailLetterID */
  180.     kMailConversationIDBit        = 10,                            /* MailLetterID */
  181.                                                                 /* Letter attributes - stored in the letter may be present in a letter and have variable length sizes */
  182.     kMailSubjectBit                = 11,                            /* RString */
  183.     kMailFromBit                = 12,                            /* MailRecipient */
  184.     kMailToBit                    = 13,                            /* MailRecipient */
  185.     kMailCcBit                    = 14,                            /* MailRecipient */
  186.     kMailBccBit                    = 15                            /* MailRecipient */
  187. };
  188.  
  189. typedef unsigned long                     MailAttributeMask;
  190. /* Values of MailAttributeMask */
  191.  
  192. enum {
  193.     kMailLetterFlagsMask        = 1L << (kMailLetterFlagsBit - 1),
  194.     kMailIndicationsMask        = 1L << (kMailIndicationsBit - 1),
  195.     kMailMsgTypeMask            = 1L << (kMailMsgTypeBit - 1),
  196.     kMailLetterIDMask            = 1L << (kMailLetterIDBit - 1),
  197.     kMailSendTimeStampMask        = 1L << (kMailSendTimeStampBit - 1),
  198.     kMailNestingLevelMask        = 1L << (kMailNestingLevelBit - 1),
  199.     kMailMsgFamilyMask            = 1L << (kMailMsgFamilyBit - 1),
  200.     kMailReplyIDMask            = 1L << (kMailReplyIDBit - 1),
  201.     kMailConversationIDMask        = 1L << (kMailConversationIDBit - 1),
  202.     kMailSubjectMask            = 1L << (kMailSubjectBit - 1),
  203.     kMailFromMask                = 1L << (kMailFromBit - 1),
  204.     kMailToMask                    = 1L << (kMailToBit - 1),
  205.     kMailCcMask                    = 1L << (kMailCcBit - 1),
  206.     kMailBccMask                = 1L << (kMailBccBit - 1)
  207. };
  208.  
  209. typedef unsigned long                     MailAttributeBitmap;
  210. /**************************************************************************************/
  211. typedef unsigned short                     MailLetterSystemFlags;
  212. /* Values of MailLetterSystemFlags */
  213. /* letter is available locally (either by nature or via cache) */
  214.  
  215. enum {
  216.     kMailIsLocalBit                = 2
  217. };
  218.  
  219.  
  220. enum {
  221.     kMailIsLocalMask            = 1L << kMailIsLocalBit
  222. };
  223.  
  224. typedef unsigned short                     MailLetterUserFlags;
  225.  
  226. enum {
  227.     kMailReadBit                = 0,                            /* this letter has been opened */
  228.     kMailDontArchiveBit            = 1,                            /* this letter is not to be archived either because it has already been archived or it should not be archived. */
  229.     kMailInTrashBit                = 2                                /* this letter is in trash */
  230. };
  231.  
  232. /* Values of MailLetterUserFlags */
  233.  
  234. enum {
  235.     kMailReadMask                = 1L << kMailReadBit,
  236.     kMailDontArchiveMask        = 1L << kMailDontArchiveBit,
  237.     kMailInTrashMask            = 1L << kMailInTrashBit
  238. };
  239.  
  240. struct MailLetterFlags {
  241.     MailLetterSystemFlags             sysFlags;
  242.     MailLetterUserFlags             userFlags;
  243. };
  244. typedef struct MailLetterFlags MailLetterFlags;
  245.  
  246. struct MailMaskedLetterFlags {
  247.     MailLetterFlags                 flagMask;                    /* flags that are to be set */
  248.     MailLetterFlags                 flagValues;                    /* and their values */
  249. };
  250. typedef struct MailMaskedLetterFlags MailMaskedLetterFlags;
  251.  
  252.  
  253. enum {
  254.     kMailOriginalInReportBit    = 1,
  255.     kMailNonReceiptReportsBit    = 3,
  256.     kMailReceiptReportsBit        = 4,
  257.     kMailForwardedBit            = 5,
  258.     kMailPriorityBit            = 6,
  259.     kMailIsReportWithOriginalBit = 8,
  260.     kMailIsReportBit            = 9,
  261.     kMailHasContentBit            = 10,
  262.     kMailHasSignatureBit        = 11,
  263.     kMailAuthenticatedBit        = 12,
  264.     kMailSentBit                = 13,
  265.     kMailNativeContentBit        = 14,
  266.     kMailImageContentBit        = 15,
  267.     kMailStandardContentBit        = 16
  268. };
  269.  
  270. /* Values of MailIndications */
  271.  
  272. enum {
  273.     kMailStandardContentMask    = 1L << (kMailStandardContentBit - 1),
  274.     kMailImageContentMask        = 1L << (kMailImageContentBit - 1),
  275.     kMailNativeContentMask        = 1L << (kMailNativeContentBit - 1),
  276.     kMailSentMask                = 1L << (kMailSentBit - 1),
  277.     kMailAuthenticatedMask        = 1L << (kMailAuthenticatedBit - 1),
  278.     kMailHasSignatureMask        = 1L << (kMailHasSignatureBit - 1),
  279.     kMailHasContentMask            = 1L << (kMailHasContentBit - 1),
  280.     kMailIsReportMask            = 1L << (kMailIsReportBit - 1),
  281.     kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
  282.     kMailPriorityMask            = 3L << (kMailPriorityBit - 1),
  283.     kMailForwardedMask            = 1L << (kMailForwardedBit - 1),
  284.     kMailReceiptReportsMask        = 1L << (kMailReceiptReportsBit - 1),
  285.     kMailNonReceiptReportsMask    = 1L << (kMailNonReceiptReportsBit - 1),
  286.     kMailOriginalInReportMask    = 3L << (kMailOriginalInReportBit - 1)
  287. };
  288.  
  289. typedef unsigned long                     MailIndications;
  290. /* values of the field originalInReport in MailIndications */
  291.  
  292. enum {
  293.     kMailNoOriginal                = 0,                            /* do not enclose original in reports */
  294.     kMailEncloseOnNonReceipt    = 3                                /* enclose original in non-delivery reports */
  295. };
  296.  
  297. typedef IPMMsgID                         MailLetterID;
  298. struct MailTime {
  299.     UTCTime                         time;                        /* current UTC(GMT) time */
  300.     UTCOffset                         offset;                        /* offset from GMT */
  301. };
  302. typedef struct MailTime MailTime;
  303.  
  304. /* innermost letter has nestingLevel 0 */
  305. typedef unsigned short                     MailNestingLevel;
  306. typedef OCERecipient                     MailRecipient;
  307. /**************************************************************************************/
  308.  
  309. enum {
  310.     kMailTextSegmentBit            = 0,
  311.     kMailPictSegmentBit            = 1,
  312.     kMailSoundSegmentBit        = 2,
  313.     kMailStyledTextSegmentBit    = 3,
  314.     kMailMovieSegmentBit        = 4
  315. };
  316.  
  317. typedef unsigned short                     MailSegmentMask;
  318. /* Values of MailSegmentMask */
  319.  
  320. enum {
  321.     kMailTextSegmentMask        = 1L << kMailTextSegmentBit,
  322.     kMailPictSegmentMask        = 1L << kMailPictSegmentBit,
  323.     kMailSoundSegmentMask        = 1L << kMailSoundSegmentBit,
  324.     kMailStyledTextSegmentMask    = 1L << kMailStyledTextSegmentBit,
  325.     kMailMovieSegmentMask        = 1L << kMailMovieSegmentBit
  326. };
  327.  
  328. typedef unsigned short                     MailSegmentType;
  329. /* Values of MailSegmentType */
  330.  
  331. enum {
  332.     kMailInvalidSegmentType        = 0,
  333.     kMailTextSegmentType        = 1,
  334.     kMailPictSegmentType        = 2,
  335.     kMailSoundSegmentType        = 3,
  336.     kMailStyledTextSegmentType    = 4,
  337.     kMailMovieSegmentType        = 5
  338. };
  339.  
  340. /**************************************************************************************/
  341.  
  342. enum {
  343.     kMailErrorLogEntryVersion    = 0x0101,
  344.     kMailMSAMErrorStringListID    = 128,                            /* These 'STR#' resources should be */
  345.     kMailMSAMActionStringListID    = 129                            /* in the PMSAM resource fork */
  346. };
  347.  
  348. typedef unsigned short                     MailLogErrorType;
  349. /* Values of MailLogErrorType */
  350.  
  351. enum {
  352.     kMailELECorrectable            = 0,
  353.     kMailELEError                = 1,
  354.     kMailELEWarning                = 2,
  355.     kMailELEInformational        = 3
  356. };
  357.  
  358. typedef short                             MailLogErrorCode;
  359. /* Values of MailLogErrorCode */
  360.  
  361. enum {
  362.     kMailMSAMErrorCode            = 0,                            /* positive codes are indices into PMSAM defined strings */
  363.     kMailMiscError                = -1,                            /* negative codes are OCE defined */
  364.     kMailNoModem                = -2                            /* modem required, but missing */
  365. };
  366.  
  367. struct MailErrorLogEntryInfo {
  368.     short                             version;
  369.     UTCTime                         timeOccurred;                /* do not fill in */
  370.     Str31                             reportingPMSAM;                /* do not fill in */
  371.     Str31                             reportingMSAMSlot;            /* do not fill in */
  372.     MailLogErrorType                 errorType;
  373.     MailLogErrorCode                 errorCode;
  374.  
  375.     short                             errorResource;                /* resources are valid if */
  376.     short                             actionResource;                /* errorCode = kMailMSAMErrorCode index starts from 1 */
  377.     unsigned long                     filler;
  378.     unsigned short                     filler2;
  379. };
  380. typedef struct MailErrorLogEntryInfo MailErrorLogEntryInfo;
  381.  
  382. /**************************************************************************************/
  383. typedef short                             MailBlockMode;
  384. /* Values of MailBlockMode */
  385.  
  386. enum {
  387.     kMailFromStart                = 1,                            /* write data from offset calculated from */
  388.     kMailFromLEOB                = 2,                            /* start of block, end of block, */
  389.     kMailFromMark                = 3                                /* or from the current mark */
  390. };
  391.  
  392. struct MailEnclosureInfo {
  393.     StringPtr                         enclosureName;
  394.     CInfoPBPtr                         catInfo;
  395.     StringPtr                         comment;
  396.     void *                            icon;
  397. };
  398. typedef struct MailEnclosureInfo MailEnclosureInfo;
  399.  
  400. /**************************************************************************************/
  401.  
  402. enum {
  403.     kOCESetupLocationNone        = 0,                            /* disconnect state */
  404.     kOCESetupLocationMax        = 8                                /* maximum location value */
  405. };
  406.  
  407. typedef char                             OCESetupLocation;
  408. /* location state is a bitmask, 0x1=>1st location active, 
  409.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  410.  */
  411. #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
  412. typedef UInt8                             MailLocationFlags;
  413. struct MailLocationInfo {
  414.     OCESetupLocation                 location;
  415.     MailLocationFlags                 active;
  416. };
  417. typedef struct MailLocationInfo MailLocationInfo;
  418.  
  419. /**************************************************************************************/
  420. /* Definitions for Personal MSAMs */
  421. /**************************************************************************************/
  422.  
  423. enum {
  424.     kMailEPPCMsgVersion            = 3
  425. };
  426.  
  427. struct MailEPPCMsg {
  428.     short                             version;
  429.     union {
  430.         SMCA *                            theSMCA;                /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
  431.         long                             sequenceNumber;            /* for 'inqu', 'dlom' */
  432.         MailLocationInfo                 locationInfo;            /* for 'locc' */
  433.     }                                 u;
  434. };
  435. typedef struct MailEPPCMsg MailEPPCMsg;
  436.  
  437. /* Values of OCE defined High Level Event message classes */
  438.  
  439. enum {
  440.     kMailEPPCCreateSlot            = FOUR_CHAR_CODE('crsl'),
  441.     kMailEPPCModifySlot            = FOUR_CHAR_CODE('mdsl'),
  442.     kMailEPPCDeleteSlot            = FOUR_CHAR_CODE('dlsl'),
  443.     kMailEPPCShutDown            = FOUR_CHAR_CODE('quit'),
  444.     kMailEPPCMailboxOpened        = FOUR_CHAR_CODE('mbop'),
  445.     kMailEPPCMailboxClosed        = FOUR_CHAR_CODE('mbcl'),
  446.     kMailEPPCMsgPending            = FOUR_CHAR_CODE('msgp'),
  447.     kMailEPPCSendImmediate        = FOUR_CHAR_CODE('sndi'),
  448.     kMailEPPCContinue            = FOUR_CHAR_CODE('cont'),
  449.     kMailEPPCSchedule            = FOUR_CHAR_CODE('sked'),
  450.     kMailEPPCAdmin                = FOUR_CHAR_CODE('admn'),
  451.     kMailEPPCInQUpdate            = FOUR_CHAR_CODE('inqu'),
  452.     kMailEPPCMsgOpened            = FOUR_CHAR_CODE('msgo'),
  453.     kMailEPPCDeleteOutQMsg        = FOUR_CHAR_CODE('dlom'),
  454.     kMailEPPCWakeup                = FOUR_CHAR_CODE('wkup'),
  455.     kMailEPPCLocationChanged    = FOUR_CHAR_CODE('locc')
  456. };
  457.  
  458. union MailTimer {
  459.     long                             frequency;                    /* how often to connect */
  460.     long                             connectTime;                /* time since midnight */
  461. };
  462. typedef union MailTimer MailTimer;
  463.  
  464.  
  465. enum {
  466.     kMailTimerOff                = 0,                            /* control is off */
  467.     kMailTimerTime                = 1,                            /* specifies connect time (relative to midnight) */
  468.     kMailTimerFrequency            = 2                                /* specifies connect frequency */
  469. };
  470.  
  471. typedef Byte                             MailTimerKind;
  472. struct MailTimers {
  473.     MailTimerKind                     sendTimeKind;                /* either kMailTimerTime or kMailTimerFrequency */
  474.     MailTimerKind                     receiveTimeKind;            /* either kMailTimerTime or kMailTimerFrequency */
  475.     MailTimer                         send;
  476.     MailTimer                         receive;
  477. };
  478. typedef struct MailTimers MailTimers;
  479.  
  480.  
  481. struct MailStandardSlotInfoAttribute {
  482.     short                             version;
  483.     MailLocationFlags                 active;                        /* active if MailLocationMask(i) is set */
  484.     Byte                             padByte;
  485.     MailTimers                         sendReceiveTimer;
  486. };
  487. typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
  488.  
  489. typedef union MSAMParam TempMSAMParam;
  490. typedef CALLBACK_API( void , MSAMIOCompletionProcPtr )(TempMSAMParam *paramBlock);
  491. /*
  492.     WARNING: MSAMIOCompletionProcPtr uses register based parameters under classic 68k
  493.              and cannot be written in a high-level language without 
  494.              the help of mixed mode or assembly glue.
  495. */
  496. typedef REGISTER_UPP_TYPE(MSAMIOCompletionProcPtr)                 MSAMIOCompletionUPP;
  497. struct PMSAMGetMSAMRecordPB {
  498.     void *                            qLink;
  499.     long                             reservedH1;
  500.     long                             reservedH2;
  501.     MSAMIOCompletionUPP             ioCompletion;
  502.     OSErr                             ioResult;
  503.     long                             saveA5;
  504.     short                             reqCode;
  505.     CreationID                         msamCID;
  506. };
  507. typedef struct PMSAMGetMSAMRecordPB PMSAMGetMSAMRecordPB;
  508.  
  509. struct PMSAMOpenQueuesPB {
  510.     void *                            qLink;
  511.     long                             reservedH1;
  512.     long                             reservedH2;
  513.     MSAMIOCompletionUPP             ioCompletion;
  514.     OSErr                             ioResult;
  515.     long                             saveA5;
  516.     short                             reqCode;
  517.     MSAMQueueRef                     inQueueRef;
  518.     MSAMQueueRef                     outQueueRef;
  519.     MSAMSlotID                         msamSlotID;
  520.     long                             filler[2];
  521. };
  522. typedef struct PMSAMOpenQueuesPB PMSAMOpenQueuesPB;
  523.  
  524. typedef unsigned short                     PMSAMStatus;
  525. /* Values of PMSAMStatus */
  526.  
  527. enum {
  528.     kPMSAMStatusPending            = 1,                            /* for inQueue and outQueue */
  529.     kPMSAMStatusError            = 2,                            /* for inQueue and outQueue */
  530.     kPMSAMStatusSending            = 3,                            /* for outQueue only */
  531.     kPMSAMStatusCaching            = 4,                            /* for inQueue only */
  532.     kPMSAMStatusSent            = 5                                /* for outQueue only */
  533. };
  534.  
  535. struct PMSAMSetStatusPB {
  536.     void *                            qLink;
  537.     long                             reservedH1;
  538.     long                             reservedH2;
  539.     MSAMIOCompletionUPP             ioCompletion;
  540.     OSErr                             ioResult;
  541.     long                             saveA5;
  542.     short                             reqCode;
  543.     MSAMQueueRef                     queueRef;
  544.     long                             seqNum;
  545.     long                             msgHint;                    /* for posting cache error,set this to 0 when report outq status */
  546.     PMSAMStatus                     status;
  547. };
  548. typedef struct PMSAMSetStatusPB PMSAMSetStatusPB;
  549.  
  550. struct PMSAMLogErrorPB {
  551.     void *                            qLink;
  552.     long                             reservedH1;
  553.     long                             reservedH2;
  554.     MSAMIOCompletionUPP             ioCompletion;
  555.     OSErr                             ioResult;
  556.     long                             saveA5;
  557.     short                             reqCode;
  558.     MSAMSlotID                         msamSlotID;                    /* 0 for PMSAM errors */
  559.     MailErrorLogEntryInfo *            logEntry;
  560.     long                             filler[2];
  561. };
  562. typedef struct PMSAMLogErrorPB PMSAMLogErrorPB;
  563.  
  564. /****************************************************************************************/
  565.  
  566. enum {
  567.     kMailMsgSummaryVersion        = 1
  568. };
  569.  
  570. struct MailMasterData {
  571.     MailAttributeBitmap             attrMask;                    /* indicates attributes present in MsgSummary */
  572.     MailLetterID                     messageID;
  573.     MailLetterID                     replyID;
  574.     MailLetterID                     conversationID;
  575. };
  576. typedef struct MailMasterData MailMasterData;
  577.  
  578. /* Values for addressedToMe in struct MailCoreData */
  579.  
  580. enum {
  581.     kAddressedAs_TO                = 0x01,
  582.     kAddressedAs_CC                = 0x02,
  583.     kAddressedAs_BCC            = 0x04
  584. };
  585.  
  586. struct MailCoreData {
  587.     MailLetterFlags                 letterFlags;
  588.     unsigned long                     messageSize;
  589.     MailIndications                 letterIndications;
  590.     OCECreatorType                     messageType;
  591.     MailTime                         sendTime;
  592.     OSType                             messageFamily;
  593.     unsigned char                     reserved;
  594.     unsigned char                     addressedToMe;
  595.     char                             agentInfo[6];                /* 6 bytes of special info [set to zero] */
  596.                                                                 /* these are variable length and even padded */
  597.     RString32                         sender;                        /* recipient's entityName (trunc)*/
  598.     RString32                         subject;                    /* subject maybe truncated */
  599. };
  600. typedef struct MailCoreData MailCoreData;
  601.  
  602. struct MSAMMsgSummary {
  603.     short                             version;                    /* following flags are defaulted by Toolbox */
  604.     Boolean                         msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  605.     Boolean                         msgUpdated;                    /* true if msgSummary was updated by MailManager */
  606.     Boolean                         msgCached;                    /* true if msg is in the slot's InQueue */
  607.     Byte                             padByte;
  608.  
  609.     MailMasterData                     masterData;
  610.     MailCoreData                     coreData;
  611. };
  612. typedef struct MSAMMsgSummary MSAMMsgSummary;
  613.  
  614. /* PMSAM can put up to 128 bytes of private msg summary data */
  615.  
  616. enum {
  617.     kMailMaxPMSAMMsgSummaryData    = 128
  618. };
  619.  
  620. struct PMSAMCreateMsgSummaryPB {
  621.     void *                            qLink;
  622.     long                             reservedH1;
  623.     long                             reservedH2;
  624.     MSAMIOCompletionUPP             ioCompletion;
  625.     OSErr                             ioResult;
  626.     long                             saveA5;
  627.     short                             reqCode;
  628.     MSAMQueueRef                     inQueueRef;
  629.     long                             seqNum;                        /* <- seq of the new message */
  630.     MSAMMsgSummary *                msgSummary;                    /* attributes and mask filled in */
  631.     MailBuffer *                    buffer;                        /* PMSAM specific data to be appended */
  632. };
  633. typedef struct PMSAMCreateMsgSummaryPB PMSAMCreateMsgSummaryPB;
  634.  
  635.  
  636. struct PMSAMPutMsgSummaryPB {
  637.     void *                            qLink;
  638.     long                             reservedH1;
  639.     long                             reservedH2;
  640.     MSAMIOCompletionUPP             ioCompletion;
  641.     OSErr                             ioResult;
  642.     long                             saveA5;
  643.     short                             reqCode;
  644.     MSAMQueueRef                     inQueueRef;
  645.     long                             seqNum;
  646.     MailMaskedLetterFlags *            letterFlags;                /* if not nil, then set msgStoreFlags */
  647.     MailBuffer *                    buffer;                        /* PMSAM specific data to be overwritten */
  648. };
  649. typedef struct PMSAMPutMsgSummaryPB PMSAMPutMsgSummaryPB;
  650.  
  651. struct PMSAMGetMsgSummaryPB {
  652.     void *                            qLink;
  653.     long                             reservedH1;
  654.     long                             reservedH2;
  655.     MSAMIOCompletionUPP             ioCompletion;
  656.     OSErr                             ioResult;
  657.     long                             saveA5;
  658.     short                             reqCode;
  659.     MSAMQueueRef                     inQueueRef;
  660.     long                             seqNum;
  661.     MSAMMsgSummary *                msgSummary;                    /* if not nil, then read in the msgSummary */
  662.     MailBuffer *                    buffer;                        /* PMSAM specific data to be read */
  663.     unsigned short                     msgSummaryOffset;            /* offset of PMSAM specific data from start of MsgSummary */
  664. };
  665. typedef struct PMSAMGetMsgSummaryPB PMSAMGetMsgSummaryPB;
  666.  
  667. /****************************************************************************************/
  668. /* Definitions for Server MSAMs */
  669. /**************************************************************************************/
  670. typedef unsigned short                     SMSAMAdminCode;
  671. /* Values of SMSAMAdminCode */
  672.  
  673. enum {
  674.     kSMSAMNotifyFwdrSetupChange    = 1,
  675.     kSMSAMNotifyFwdrNameChange    = 2,
  676.     kSMSAMNotifyFwdrPwdChange    = 3,
  677.     kSMSAMGetDynamicFwdrParams    = 4
  678. };
  679.  
  680. typedef unsigned long                     SMSAMSlotChanges;
  681.  
  682. enum {
  683.     kSMSAMFwdrHomeInternetChangedBit = 0,
  684.     kSMSAMFwdrConnectedToChangedBit = 1,
  685.     kSMSAMFwdrForeignRLIsChangedBit = 2,
  686.     kSMSAMFwdrMnMServerChangedBit = 3
  687. };
  688.  
  689. /* Values of SMSAMSlotChanges */
  690.  
  691. enum {
  692.     kSMSAMFwdrEverythingChangedMask = -1,
  693.     kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
  694.     kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
  695.     kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
  696.     kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
  697. };
  698.  
  699. /* kSMSAMNotifyFwdrSetupChange */
  700. struct SMSAMSetupChange {
  701.     SMSAMSlotChanges                 whatChanged;                /*  --> bitmap of what parameters changed */
  702.     AddrBlock                         serverHint;                    /*  --> try this ADAP server first */
  703. };
  704. typedef struct SMSAMSetupChange SMSAMSetupChange;
  705.  
  706. /* kSMSAMNotifyFwdrNameChange */
  707. struct SMSAMNameChange {
  708.     RString                         newName;                    /*  --> msams new name */
  709.     AddrBlock                         serverHint;                    /*  --> try this ADAP server first */
  710. };
  711. typedef struct SMSAMNameChange SMSAMNameChange;
  712.  
  713. /* kSMSAMNotifyFwdrPasswordChange */
  714. struct SMSAMPasswordChange {
  715.     RString                         newPassword;                /*  --> msams new password */
  716.     AddrBlock                         serverHint;                    /*  --> try this ADAP server first */
  717. };
  718. typedef struct SMSAMPasswordChange SMSAMPasswordChange;
  719.  
  720. /* kSMSAMGetDynamicFwdrParams */
  721. struct SMSAMDynamicParams {
  722.     unsigned long                     curDiskUsed;                /* <--  amount of disk space used by msam */
  723.     unsigned long                     curMemoryUsed;                /* <--  amount of memory used by msam */
  724. };
  725. typedef struct SMSAMDynamicParams SMSAMDynamicParams;
  726.  
  727. struct SMSAMAdminEPPCRequest {
  728.     SMSAMAdminCode                     adminCode;
  729.     union {
  730.         SMSAMSetupChange                 setupChange;
  731.         SMSAMNameChange                 nameChange;
  732.         SMSAMPasswordChange             passwordChange;
  733.         SMSAMDynamicParams                 dynamicParams;
  734.     }                                 u;
  735. };
  736. typedef struct SMSAMAdminEPPCRequest SMSAMAdminEPPCRequest;
  737.  
  738. struct SMSAMSetupPB {
  739.     void *                            qLink;
  740.     long                             reservedH1;
  741.     long                             reservedH2;
  742.     MSAMIOCompletionUPP             ioCompletion;
  743.     OSErr                             ioResult;
  744.     long                             saveA5;
  745.     short                             reqCode;
  746.     RecordIDPtr                     serverMSAM;
  747.     RStringPtr                         password;
  748.     OSType                             gatewayType;
  749.     RStringPtr                         gatewayTypeDescription;
  750.     AddrBlock                         catalogServerHint;
  751. };
  752. typedef struct SMSAMSetupPB SMSAMSetupPB;
  753.  
  754. struct SMSAMStartupPB {
  755.     void *                            qLink;
  756.     long                             reservedH1;
  757.     long                             reservedH2;
  758.     MSAMIOCompletionUPP             ioCompletion;
  759.     OSErr                             ioResult;
  760.     long                             saveA5;
  761.     short                             reqCode;
  762.     AuthIdentity                     msamIdentity;
  763.     MSAMQueueRef                     queueRef;
  764. };
  765. typedef struct SMSAMStartupPB SMSAMStartupPB;
  766.  
  767. struct SMSAMShutdownPB {
  768.     void *                            qLink;
  769.     long                             reservedH1;
  770.     long                             reservedH2;
  771.     MSAMIOCompletionUPP             ioCompletion;
  772.     OSErr                             ioResult;
  773.     long                             saveA5;
  774.     short                             reqCode;
  775.     MSAMQueueRef                     queueRef;
  776. };
  777. typedef struct SMSAMShutdownPB SMSAMShutdownPB;
  778.  
  779. /****************************************************************************************/
  780. /* Definitions for reading and writing MSAM Letters */
  781. /****************************************************************************************/
  782. struct MSAMEnumeratePB {
  783.     void *                            qLink;
  784.     long                             reservedH1;
  785.     long                             reservedH2;
  786.     MSAMIOCompletionUPP             ioCompletion;
  787.     OSErr                             ioResult;
  788.     long                             saveA5;
  789.     short                             reqCode;
  790.     MSAMQueueRef                     queueRef;
  791.     long                             startSeqNum;
  792.     long                             nextSeqNum;
  793.                                                                 /* buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue */
  794.     MailBuffer                         buffer;
  795. };
  796. typedef struct MSAMEnumeratePB MSAMEnumeratePB;
  797.  
  798. struct MSAMEnumerateInQReply {
  799.     long                             seqNum;
  800.     Boolean                         msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  801.     Boolean                         msgUpdated;                    /* true if MsgSummary has been updated by TB */
  802.     Boolean                         msgCached;                    /* true if msg is in the incoming queue */
  803.     Byte                             padByte;
  804. };
  805. typedef struct MSAMEnumerateInQReply MSAMEnumerateInQReply;
  806.  
  807. struct MSAMEnumerateOutQReply {
  808.     long                             seqNum;
  809.     Boolean                         done;                        /* true if all responsible recipients have been processed */
  810.     IPMPriority                     priority;
  811.     OSType                             msgFamily;
  812.     long                             approxSize;
  813.     Boolean                         tunnelForm;                    /* true if this letter has to be tunnelled */
  814.     Byte                             padByte;
  815.     NetworkSpec                     nextHop;                    /* valid if tunnelForm is true */
  816.     OCECreatorType                     msgType;
  817. };
  818. typedef struct MSAMEnumerateOutQReply MSAMEnumerateOutQReply;
  819.  
  820. struct MSAMDeletePB {
  821.     void *                            qLink;
  822.     long                             reservedH1;
  823.     long                             reservedH2;
  824.     MSAMIOCompletionUPP             ioCompletion;
  825.     OSErr                             ioResult;
  826.     long                             saveA5;
  827.     short                             reqCode;
  828.     MSAMQueueRef                     queueRef;
  829.     long                             seqNum;
  830.     Boolean                         msgOnly;                    /* only valid for PMSAM & inQueue */
  831.                                                                 /* set true to delete message but not msgSummary */
  832.     Byte                             padByte;
  833.                                                                 /* only valid for SMSAM & tunnelled messages */
  834.     OSErr                             result;
  835. };
  836. typedef struct MSAMDeletePB MSAMDeletePB;
  837.  
  838. struct MSAMOpenPB {
  839.     void *                            qLink;
  840.     long                             reservedH1;
  841.     long                             reservedH2;
  842.     MSAMIOCompletionUPP             ioCompletion;
  843.     OSErr                             ioResult;
  844.     long                             saveA5;
  845.     short                             reqCode;
  846.     MSAMQueueRef                     queueRef;
  847.     long                             seqNum;
  848.     MailMsgRef                         mailMsgRef;
  849. };
  850. typedef struct MSAMOpenPB MSAMOpenPB;
  851.  
  852. struct MSAMOpenNestedPB {
  853.     void *                            qLink;
  854.     long                             reservedH1;
  855.     long                             reservedH2;
  856.     MSAMIOCompletionUPP             ioCompletion;
  857.     OSErr                             ioResult;
  858.     long                             saveA5;
  859.     short                             reqCode;
  860.     MailMsgRef                         mailMsgRef;
  861.     MailMsgRef                         nestedRef;
  862. };
  863. typedef struct MSAMOpenNestedPB MSAMOpenNestedPB;
  864.  
  865. struct MSAMClosePB {
  866.     void *                            qLink;
  867.     long                             reservedH1;
  868.     long                             reservedH2;
  869.     MSAMIOCompletionUPP             ioCompletion;
  870.     OSErr                             ioResult;
  871.     long                             saveA5;
  872.     short                             reqCode;
  873.     MailMsgRef                         mailMsgRef;
  874. };
  875. typedef struct MSAMClosePB MSAMClosePB;
  876.  
  877. struct MSAMGetMsgHeaderPB {
  878.     void *                            qLink;
  879.     long                             reservedH1;
  880.     long                             reservedH2;
  881.     MSAMIOCompletionUPP             ioCompletion;
  882.     OSErr                             ioResult;
  883.     long                             saveA5;
  884.     short                             reqCode;
  885.     MailMsgRef                         mailMsgRef;
  886.     IPMHeaderSelector                 selector;
  887.     Boolean                         filler1;
  888.     unsigned long                     offset;
  889.     MailBuffer                         buffer;
  890.     unsigned long                     remaining;
  891. };
  892. typedef struct MSAMGetMsgHeaderPB MSAMGetMsgHeaderPB;
  893.  
  894. /*    MSAMGetAttributesPB.buffer returned will contain the attribute values of 
  895.     the attributes indicated in responseMask, 
  896.     from the attribute indicated by the least significant bit set
  897.     to the attribute indicated by the most significant bit set.
  898.     Note that recipients - from, to, cc, bcc cannot be read using
  899.     this call. Use GetRecipients to read these. 
  900. */
  901. struct MSAMGetAttributesPB {
  902.     void *                            qLink;
  903.     long                             reservedH1;
  904.     long                             reservedH2;
  905.     MSAMIOCompletionUPP             ioCompletion;
  906.     OSErr                             ioResult;
  907.     long                             saveA5;
  908.     short                             reqCode;
  909.     MailMsgRef                         mailMsgRef;
  910.     MailAttributeBitmap             requestMask;                /* kMailIndicationsBit thru kMailSubjectBit */
  911.     MailBuffer                         buffer;
  912.     MailAttributeBitmap             responseMask;
  913.     Boolean                         more;
  914.     Boolean                         filler1;
  915. };
  916. typedef struct MSAMGetAttributesPB MSAMGetAttributesPB;
  917.  
  918. /* attrID value to get resolved recipient list */
  919.  
  920. enum {
  921.     kMailResolvedList            = 0
  922. };
  923.  
  924. struct MailOriginalRecipient {
  925.     short                             index;
  926. };
  927. typedef struct MailOriginalRecipient MailOriginalRecipient;
  928.  
  929. /* Followed by OCEPackedRecipient */
  930.  
  931.  
  932. struct MailResolvedRecipient {
  933.     short                             index;
  934.     short                             recipientFlags;
  935.     Boolean                         responsible;
  936.     Byte                             padByte;
  937. };
  938. typedef struct MailResolvedRecipient MailResolvedRecipient;
  939.  
  940. /* Followed by OCEPackedRecipient */
  941.  
  942.  
  943. /*     MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
  944.     MailOriginalRecipient if getting original recipients 
  945.                             ie the attrID is kMail[From, To, Cc, Bcc]Bit
  946.     MailResolvedRecipient if getting resolved reicpients
  947.                             ie the attrID is kMailResolvedList
  948.     Both tuples are word alligned.  
  949. */
  950. struct MSAMGetRecipientsPB {
  951.     void *                            qLink;
  952.     long                             reservedH1;
  953.     long                             reservedH2;
  954.     MSAMIOCompletionUPP             ioCompletion;
  955.     OSErr                             ioResult;
  956.     long                             saveA5;
  957.     short                             reqCode;
  958.     MailMsgRef                         mailMsgRef;
  959.     MailAttributeID                 attrID;                        /* kMailFromBit thru kMailBccBit */
  960.     unsigned short                     startIndex;                    /* starts at 1 */
  961.     MailBuffer                         buffer;
  962.     unsigned short                     nextIndex;
  963.     Boolean                         more;
  964.     Boolean                         filler1;
  965. };
  966. typedef struct MSAMGetRecipientsPB MSAMGetRecipientsPB;
  967.  
  968. struct MSAMGetContentPB {
  969.     void *                            qLink;
  970.     long                             reservedH1;
  971.     long                             reservedH2;
  972.     MSAMIOCompletionUPP             ioCompletion;
  973.     OSErr                             ioResult;
  974.     long                             saveA5;
  975.     short                             reqCode;
  976.     MailMsgRef                         mailMsgRef;
  977.     MailSegmentMask                 segmentMask;
  978.     MailBuffer                         buffer;
  979.     StScrpRec *                        textScrap;
  980.     ScriptCode                         script;
  981.     MailSegmentType                 segmentType;
  982.     Boolean                         endOfScript;
  983.     Boolean                         endOfSegment;
  984.     Boolean                         endOfContent;
  985.     Boolean                         filler1;
  986.     long                             segmentLength;                /* NEW: <-  valid first call in a segment */
  987.     long                             segmentID;                    /* NEW: <-> identifier for this segment */
  988. };
  989. typedef struct MSAMGetContentPB MSAMGetContentPB;
  990.  
  991. struct MSAMGetEnclosurePB {
  992.     void *                            qLink;
  993.     long                             reservedH1;
  994.     long                             reservedH2;
  995.     MSAMIOCompletionUPP             ioCompletion;
  996.     OSErr                             ioResult;
  997.     long                             saveA5;
  998.     short                             reqCode;
  999.     MailMsgRef                         mailMsgRef;
  1000.     Boolean                         contentEnclosure;
  1001.     Byte                             padByte;
  1002.     MailBuffer                         buffer;
  1003.     Boolean                         endOfFile;
  1004.     Boolean                         endOfEnclosures;
  1005. };
  1006. typedef struct MSAMGetEnclosurePB MSAMGetEnclosurePB;
  1007.  
  1008. struct MailBlockInfo {
  1009.     OCECreatorType                     blockType;
  1010.     unsigned long                     offset;
  1011.     unsigned long                     blockLength;
  1012. };
  1013. typedef struct MailBlockInfo MailBlockInfo;
  1014.  
  1015. struct MSAMEnumerateBlocksPB {
  1016.     void *                            qLink;
  1017.     long                             reservedH1;
  1018.     long                             reservedH2;
  1019.     MSAMIOCompletionUPP             ioCompletion;
  1020.     OSErr                             ioResult;
  1021.     long                             saveA5;
  1022.     short                             reqCode;
  1023.     MailMsgRef                         mailMsgRef;
  1024.     unsigned short                     startIndex;                    /* starts at 1 */
  1025.     MailBuffer                         buffer;
  1026.                                                                 /*     buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
  1027.     unsigned short                     nextIndex;
  1028.     Boolean                         more;
  1029.     Boolean                         filler1;
  1030. };
  1031. typedef struct MSAMEnumerateBlocksPB MSAMEnumerateBlocksPB;
  1032.  
  1033. struct MSAMGetBlockPB {
  1034.     void *                            qLink;
  1035.     long                             reservedH1;
  1036.     long                             reservedH2;
  1037.     MSAMIOCompletionUPP             ioCompletion;
  1038.     OSErr                             ioResult;
  1039.     long                             saveA5;
  1040.     short                             reqCode;
  1041.     MailMsgRef                         mailMsgRef;
  1042.     OCECreatorType                     blockType;
  1043.     unsigned short                     blockIndex;
  1044.     MailBuffer                         buffer;
  1045.     unsigned long                     dataOffset;
  1046.     Boolean                         endOfBlock;
  1047.     Byte                             padByte;
  1048.     unsigned long                     remaining;
  1049. };
  1050. typedef struct MSAMGetBlockPB MSAMGetBlockPB;
  1051.  
  1052. /* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1053.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1054.  * REASONS.
  1055. */
  1056. /* not valid for tunnel form letters */
  1057. struct MSAMMarkRecipientsPB {
  1058.     void *                            qLink;
  1059.     long                             reservedH1;
  1060.     long                             reservedH2;
  1061.     MSAMIOCompletionUPP             ioCompletion;
  1062.     OSErr                             ioResult;
  1063.     long                             saveA5;
  1064.     short                             reqCode;
  1065.     MSAMQueueRef                     queueRef;
  1066.     long                             seqNum;
  1067.     MailBuffer                         buffer;                        /*     buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
  1068.  
  1069. };
  1070. typedef struct MSAMMarkRecipientsPB MSAMMarkRecipientsPB;
  1071.  
  1072. /* 
  1073.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1074.  * queueRef, seqNum 
  1075. */
  1076. /* not valid for tunnel form letters */
  1077. struct MSAMnMarkRecipientsPB {
  1078.     void *                            qLink;
  1079.     long                             reservedH1;
  1080.     long                             reservedH2;
  1081.     MSAMIOCompletionUPP             ioCompletion;
  1082.     OSErr                             ioResult;
  1083.     long                             saveA5;
  1084.     short                             reqCode;
  1085.     MailMsgRef                         mailMsgRef;
  1086.     MailBuffer                         buffer;                        /*     buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
  1087.  
  1088. };
  1089. typedef struct MSAMnMarkRecipientsPB MSAMnMarkRecipientsPB;
  1090.  
  1091. /****************************************************************************************/
  1092. struct MSAMCreatePB {
  1093.     void *                            qLink;
  1094.     long                             reservedH1;
  1095.     long                             reservedH2;
  1096.     MSAMIOCompletionUPP             ioCompletion;
  1097.     OSErr                             ioResult;
  1098.     long                             saveA5;
  1099.     short                             reqCode;
  1100.     MSAMQueueRef                     queueRef;
  1101.     Boolean                         asLetter;                    /* indicate if we should create as letter or msg */
  1102.     Boolean                         filler1;
  1103.     IPMMsgType                         msgType;                    /* up to application discretion: must be of IPMSenderTag  kIPMOSFormatType for asLetter=true */
  1104.     long                             refCon;                        /* for messages only */
  1105.     long                             seqNum;                        /* set if creating message in the inQueue */
  1106.     Boolean                         tunnelForm;                    /* if true tunnelForm else newForm */
  1107.     Boolean                         bccRecipients;                /* true if creating letter with bcc recipients */
  1108.     MailMsgRef                         newRef;
  1109. };
  1110. typedef struct MSAMCreatePB MSAMCreatePB;
  1111.  
  1112. struct MSAMBeginNestedPB {
  1113.     void *                            qLink;
  1114.     long                             reservedH1;
  1115.     long                             reservedH2;
  1116.     MSAMIOCompletionUPP             ioCompletion;
  1117.     OSErr                             ioResult;
  1118.     long                             saveA5;
  1119.     short                             reqCode;
  1120.     MailMsgRef                         mailMsgRef;
  1121.     long                             refCon;                        /* for messages only */
  1122.     IPMMsgType                         msgType;
  1123. };
  1124. typedef struct MSAMBeginNestedPB MSAMBeginNestedPB;
  1125.  
  1126. struct MSAMEndNestedPB {
  1127.     void *                            qLink;
  1128.     long                             reservedH1;
  1129.     long                             reservedH2;
  1130.     MSAMIOCompletionUPP             ioCompletion;
  1131.     OSErr                             ioResult;
  1132.     long                             saveA5;
  1133.     short                             reqCode;
  1134.     MailMsgRef                         mailMsgRef;
  1135. };
  1136. typedef struct MSAMEndNestedPB MSAMEndNestedPB;
  1137.  
  1138. struct MSAMSubmitPB {
  1139.     void *                            qLink;
  1140.     long                             reservedH1;
  1141.     long                             reservedH2;
  1142.     MSAMIOCompletionUPP             ioCompletion;
  1143.     OSErr                             ioResult;
  1144.     long                             saveA5;
  1145.     short                             reqCode;
  1146.     MailMsgRef                         mailMsgRef;
  1147.     Boolean                         submitFlag;
  1148.     Byte                             padByte;
  1149.     MailLetterID                     msgID;
  1150. };
  1151. typedef struct MSAMSubmitPB MSAMSubmitPB;
  1152.  
  1153. struct MSAMPutMsgHeaderPB {
  1154.     void *                            qLink;
  1155.     long                             reservedH1;
  1156.     long                             reservedH2;
  1157.     MSAMIOCompletionUPP             ioCompletion;
  1158.     OSErr                             ioResult;
  1159.     long                             saveA5;
  1160.     short                             reqCode;
  1161.     MailMsgRef                         mailMsgRef;
  1162.     OCERecipient *                    replyQueue;
  1163.     IPMSender *                        sender;
  1164.     IPMNotificationType             deliveryNotification;
  1165.     IPMPriority                     priority;
  1166. };
  1167. typedef struct MSAMPutMsgHeaderPB MSAMPutMsgHeaderPB;
  1168.  
  1169. struct MSAMPutAttributePB {
  1170.     void *                            qLink;
  1171.     long                             reservedH1;
  1172.     long                             reservedH2;
  1173.     MSAMIOCompletionUPP             ioCompletion;
  1174.     OSErr                             ioResult;
  1175.     long                             saveA5;
  1176.     short                             reqCode;
  1177.     MailMsgRef                         mailMsgRef;
  1178.     MailAttributeID                 attrID;                        /* kMailIndicationsBit thru kMailSubjectBit */
  1179.     MailBuffer                         buffer;
  1180. };
  1181. typedef struct MSAMPutAttributePB MSAMPutAttributePB;
  1182.  
  1183. struct MSAMPutRecipientPB {
  1184.     void *                            qLink;
  1185.     long                             reservedH1;
  1186.     long                             reservedH2;
  1187.     MSAMIOCompletionUPP             ioCompletion;
  1188.     OSErr                             ioResult;
  1189.     long                             saveA5;
  1190.     short                             reqCode;
  1191.     MailMsgRef                         mailMsgRef;
  1192.     MailAttributeID                 attrID;                        /* kMailFromBit thru kMailBccBit */
  1193.     MailRecipient *                    recipient;
  1194.     Boolean                         responsible;                /* valid for server and message msams only */
  1195.     Boolean                         filler1;
  1196. };
  1197. typedef struct MSAMPutRecipientPB MSAMPutRecipientPB;
  1198.  
  1199. struct MSAMPutContentPB {
  1200.     void *                            qLink;
  1201.     long                             reservedH1;
  1202.     long                             reservedH2;
  1203.     MSAMIOCompletionUPP             ioCompletion;
  1204.     OSErr                             ioResult;
  1205.     long                             saveA5;
  1206.     short                             reqCode;
  1207.  
  1208.     MailMsgRef                         mailMsgRef;
  1209.     MailSegmentType                 segmentType;
  1210.     Boolean                         append;
  1211.     Byte                             padByte;
  1212.     MailBuffer                         buffer;
  1213.     StScrpRec *                        textScrap;
  1214.     Boolean                         startNewScript;
  1215.     Boolean                         filler1;
  1216.     ScriptCode                         script;                        /* valid only if startNewScript is true */
  1217. };
  1218. typedef struct MSAMPutContentPB MSAMPutContentPB;
  1219.  
  1220. struct MSAMPutEnclosurePB {
  1221.     void *                            qLink;
  1222.     long                             reservedH1;
  1223.     long                             reservedH2;
  1224.     MSAMIOCompletionUPP             ioCompletion;
  1225.     OSErr                             ioResult;
  1226.     long                             saveA5;
  1227.     short                             reqCode;
  1228.     MailMsgRef                         mailMsgRef;
  1229.     Boolean                         contentEnclosure;
  1230.     Byte                             padByte;
  1231.     Boolean                         hfs;                        /* true => in file system, false => in memory */
  1232.  
  1233.     Boolean                         append;
  1234.     MailBuffer                         buffer;                        /* Unused if hfs == true */
  1235.     FSSpec                             enclosure;
  1236.     MailEnclosureInfo                 addlInfo;
  1237. };
  1238. typedef struct MSAMPutEnclosurePB MSAMPutEnclosurePB;
  1239.  
  1240. struct MSAMPutBlockPB {
  1241.     void *                            qLink;
  1242.     long                             reservedH1;
  1243.     long                             reservedH2;
  1244.     MSAMIOCompletionUPP             ioCompletion;
  1245.     OSErr                             ioResult;
  1246.     long                             saveA5;
  1247.     short                             reqCode;
  1248.     MailMsgRef                         mailMsgRef;
  1249.     long                             refCon;                        /* for messages only */
  1250.     OCECreatorType                     blockType;
  1251.     Boolean                         append;
  1252.     Boolean                         filler1;
  1253.     MailBuffer                         buffer;
  1254.     MailBlockMode                     mode;                        /* if blockType is kMailTunnelLtrType or kMailHopInfoType  mode is assumed to be kMailFromMark */
  1255.     unsigned long                     offset;
  1256. };
  1257. typedef struct MSAMPutBlockPB MSAMPutBlockPB;
  1258.  
  1259. /****************************************************************************************/
  1260. struct MSAMCreateReportPB {
  1261.     void *                            qLink;
  1262.     long                             reservedH1;
  1263.     long                             reservedH2;
  1264.     MSAMIOCompletionUPP             ioCompletion;
  1265.     OSErr                             ioResult;
  1266.     long                             saveA5;
  1267.     short                             reqCode;
  1268.     MSAMQueueRef                     queueRef;                    /* to distinguish personal and server MSAMs */
  1269.     MailMsgRef                         mailMsgRef;
  1270.     MailLetterID                     msgID;                        /* kMailLetterIDBit of letter being reported upon */
  1271.     MailRecipient *                    sender;                        /* sender of the letter you are creating report on */
  1272. };
  1273. typedef struct MSAMCreateReportPB MSAMCreateReportPB;
  1274.  
  1275. struct MSAMPutRecipientReportPB {
  1276.     void *                            qLink;
  1277.     long                             reservedH1;
  1278.     long                             reservedH2;
  1279.     MSAMIOCompletionUPP             ioCompletion;
  1280.     OSErr                             ioResult;
  1281.     long                             saveA5;
  1282.     short                             reqCode;
  1283.     MailMsgRef                         mailMsgRef;
  1284.     short                             recipientIndex;                /* recipient index in the original letter */
  1285.     OSErr                             result;                        /* result of sending the recipient */
  1286. };
  1287. typedef struct MSAMPutRecipientReportPB MSAMPutRecipientReportPB;
  1288.  
  1289. /****************************************************************************************/
  1290. struct MailWakeupPMSAMPB {
  1291.     void *                            qLink;
  1292.     long                             reservedH1;
  1293.     long                             reservedH2;
  1294.     MSAMIOCompletionUPP             ioCompletion;
  1295.     OSErr                             ioResult;
  1296.     long                             saveA5;
  1297.     short                             reqCode;
  1298.     CreationID                         pmsamCID;
  1299.     MailSlotID                         mailSlotID;
  1300. };
  1301. typedef struct MailWakeupPMSAMPB MailWakeupPMSAMPB;
  1302.  
  1303. struct MailCreateMailSlotPB {
  1304.     void *                            qLink;
  1305.     long                             reservedH1;
  1306.     long                             reservedH2;
  1307.     MSAMIOCompletionUPP             ioCompletion;
  1308.     OSErr                             ioResult;
  1309.     long                             saveA5;
  1310.     short                             reqCode;
  1311.     MailboxRef                         mailboxRef;
  1312.     long                             timeout;
  1313.     CreationID                         pmsamCID;
  1314.     SMCA                             smca;
  1315. };
  1316. typedef struct MailCreateMailSlotPB MailCreateMailSlotPB;
  1317.  
  1318. struct MailModifyMailSlotPB {
  1319.     void *                            qLink;
  1320.     long                             reservedH1;
  1321.     long                             reservedH2;
  1322.     MSAMIOCompletionUPP             ioCompletion;
  1323.     OSErr                             ioResult;
  1324.     long                             saveA5;
  1325.     short                             reqCode;
  1326.     MailboxRef                         mailboxRef;
  1327.     long                             timeout;
  1328.     CreationID                         pmsamCID;
  1329.     SMCA                             smca;
  1330. };
  1331. typedef struct MailModifyMailSlotPB MailModifyMailSlotPB;
  1332.  
  1333. union MSAMParam {
  1334.     struct {
  1335.         void *                            qLink;
  1336.         long                             reservedH1;
  1337.         long                             reservedH2;
  1338.         MSAMIOCompletionUPP             ioCompletion;
  1339.         OSErr                             ioResult;
  1340.         long                             saveA5;
  1341.         short                             reqCode;
  1342.     }                                 header;
  1343.  
  1344.     PMSAMGetMSAMRecordPB             pmsamGetMSAMRecord;
  1345.     PMSAMOpenQueuesPB                 pmsamOpenQueues;
  1346.     PMSAMSetStatusPB                 pmsamSetStatus;
  1347.     PMSAMLogErrorPB                 pmsamLogError;
  1348.  
  1349.  
  1350.     SMSAMSetupPB                     smsamSetup;
  1351.     SMSAMStartupPB                     smsamStartup;
  1352.     SMSAMShutdownPB                 smsamShutdown;
  1353.  
  1354.     MSAMEnumeratePB                 msamEnumerate;
  1355.     MSAMDeletePB                     msamDelete;
  1356.  
  1357.     MSAMOpenPB                         msamOpen;
  1358.     MSAMOpenNestedPB                 msamOpenNested;
  1359.     MSAMClosePB                     msamClose;
  1360.     MSAMGetMsgHeaderPB                 msamGetMsgHeader;
  1361.     MSAMGetAttributesPB             msamGetAttributes;
  1362.     MSAMGetRecipientsPB             msamGetRecipients;
  1363.     MSAMGetContentPB                 msamGetContent;
  1364.     MSAMGetEnclosurePB                 msamGetEnclosure;
  1365.     MSAMEnumerateBlocksPB             msamEnumerateBlocks;
  1366.     MSAMGetBlockPB                     msamGetBlock;
  1367.     MSAMMarkRecipientsPB             msamMarkRecipients;
  1368.     MSAMnMarkRecipientsPB             msamnMarkRecipients;
  1369.  
  1370.     MSAMCreatePB                     msamCreate;
  1371.     MSAMBeginNestedPB                 msamBeginNested;
  1372.     MSAMEndNestedPB                 msamEndNested;
  1373.     MSAMSubmitPB                     msamSubmit;
  1374.     MSAMPutMsgHeaderPB                 msamPutMsgHeader;
  1375.     MSAMPutAttributePB                 msamPutAttribute;
  1376.     MSAMPutRecipientPB                 msamPutRecipient;
  1377.     MSAMPutContentPB                 msamPutContent;
  1378.     MSAMPutEnclosurePB                 msamPutEnclosure;            /* this field is SYSTEM8_DEPRECATED*/
  1379.     MSAMPutBlockPB                     msamPutBlock;
  1380.  
  1381.     MSAMCreateReportPB                 msamCreateReport;            /* Reports and Error Handling Calls */
  1382.     MSAMPutRecipientReportPB         msamPutRecipientReport;
  1383.  
  1384.     PMSAMCreateMsgSummaryPB         pmsamCreateMsgSummary;
  1385.     PMSAMPutMsgSummaryPB             pmsamPutMsgSummary;
  1386.     PMSAMGetMsgSummaryPB             pmsamGetMsgSummary;
  1387.  
  1388.     MailWakeupPMSAMPB                 wakeupPMSAM;
  1389.     MailCreateMailSlotPB             createMailSlot;
  1390.     MailModifyMailSlotPB             modifyMailSlot;
  1391. };
  1392. typedef union MSAMParam MSAMParam;
  1393.  
  1394. enum { uppMSAMIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  1395. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1396.     #pragma parameter CallMSAMIOCompletionProc(__A1, __A0)
  1397.     void CallMSAMIOCompletionProc(MSAMIOCompletionUPP routine, TempMSAMParam * paramBlock) = 0x4E91;
  1398. #else
  1399.     #define CallMSAMIOCompletionProc(userRoutine, paramBlock)     CALL_ONE_PARAMETER_UPP((userRoutine), uppMSAMIOCompletionProcInfo, (paramBlock))
  1400. #endif
  1401. #define NewMSAMIOCompletionProc(userRoutine)                     (MSAMIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, GetCurrentArchitecture())
  1402. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1403. EXTERN_API( OSErr )
  1404. MailCreateMailSlot                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052B, 0xAA5E);
  1405.  
  1406. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1407. EXTERN_API( OSErr )
  1408. MailModifyMailSlot                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052C, 0xAA5E);
  1409.  
  1410. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1411. EXTERN_API( OSErr )
  1412. MailWakeupPMSAM                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x0507, 0xAA5E);
  1413.  
  1414. /* Personal MSAM Glue Routines */
  1415. EXTERN_API( OSErr )
  1416. PMSAMOpenQueues                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0500, 0xAA5E);
  1417.  
  1418. EXTERN_API( OSErr )
  1419. PMSAMSetStatus                    (MSAMParam *            paramBlock,
  1420.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0527, 0xAA5E);
  1421.  
  1422. /* SYNC ONLY */
  1423. EXTERN_API( OSErr )
  1424. PMSAMGetMSAMRecord                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0506, 0xAA5E);
  1425.  
  1426. /* Server MSAM Glue Routines */
  1427. /* SYNC ONLY */
  1428. EXTERN_API( OSErr )
  1429. SMSAMSetup                        (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0523, 0xAA5E);
  1430.  
  1431. /* SYNC ONLY */
  1432. EXTERN_API( OSErr )
  1433. SMSAMStartup                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0501, 0xAA5E);
  1434.  
  1435. EXTERN_API( OSErr )
  1436. SMSAMShutdown                    (MSAMParam *            paramBlock,
  1437.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0502, 0xAA5E);
  1438.  
  1439. /* Get Interface Glue Routines */
  1440. EXTERN_API( OSErr )
  1441. MSAMEnumerate                    (MSAMParam *            paramBlock,
  1442.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0503, 0xAA5E);
  1443.  
  1444. EXTERN_API( OSErr )
  1445. MSAMDelete                        (MSAMParam *            paramBlock,
  1446.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0504, 0xAA5E);
  1447.  
  1448. EXTERN_API( OSErr )
  1449. MSAMMarkRecipients                (MSAMParam *            paramBlock,
  1450.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0505, 0xAA5E);
  1451.  
  1452. EXTERN_API( OSErr )
  1453. MSAMnMarkRecipients                (MSAMParam *            paramBlock,
  1454.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0512, 0xAA5E);
  1455.  
  1456. EXTERN_API( OSErr )
  1457. MSAMOpen                        (MSAMParam *            paramBlock,
  1458.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0508, 0xAA5E);
  1459.  
  1460. EXTERN_API( OSErr )
  1461. MSAMOpenNested                    (MSAMParam *            paramBlock,
  1462.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0509, 0xAA5E);
  1463.  
  1464. EXTERN_API( OSErr )
  1465. MSAMClose                        (MSAMParam *            paramBlock,
  1466.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050A, 0xAA5E);
  1467.  
  1468. EXTERN_API( OSErr )
  1469. MSAMGetRecipients                (MSAMParam *            paramBlock,
  1470.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050C, 0xAA5E);
  1471.  
  1472. EXTERN_API( OSErr )
  1473. MSAMGetAttributes                (MSAMParam *            paramBlock,
  1474.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050B, 0xAA5E);
  1475.  
  1476. EXTERN_API( OSErr )
  1477. MSAMGetContent                    (MSAMParam *            paramBlock,
  1478.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050D, 0xAA5E);
  1479.  
  1480. EXTERN_API( OSErr )
  1481. MSAMGetEnclosure                (MSAMParam *            paramBlock,
  1482.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050E, 0xAA5E);
  1483.  
  1484. EXTERN_API( OSErr )
  1485. MSAMEnumerateBlocks                (MSAMParam *            paramBlock,
  1486.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050F, 0xAA5E);
  1487.  
  1488. EXTERN_API( OSErr )
  1489. MSAMGetBlock                    (MSAMParam *            paramBlock,
  1490.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0510, 0xAA5E);
  1491.  
  1492. EXTERN_API( OSErr )
  1493. MSAMGetMsgHeader                (MSAMParam *            paramBlock,
  1494.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0511, 0xAA5E);
  1495.  
  1496. /* Put Interface Glue Routines */
  1497. EXTERN_API( OSErr )
  1498. MSAMCreate                        (MSAMParam *            paramBlock,
  1499.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0514, 0xAA5E);
  1500.  
  1501. EXTERN_API( OSErr )
  1502. MSAMBeginNested                    (MSAMParam *            paramBlock,
  1503.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0515, 0xAA5E);
  1504.  
  1505. EXTERN_API( OSErr )
  1506. MSAMEndNested                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0516, 0xAA5E);
  1507.  
  1508. /*  SYNCHRONOUS ONLY */
  1509. EXTERN_API( OSErr )
  1510. MSAMSubmit                        (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0517, 0xAA5E);
  1511.  
  1512. EXTERN_API( OSErr )
  1513. MSAMPutAttribute                (MSAMParam *            paramBlock,
  1514.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0518, 0xAA5E);
  1515.  
  1516. EXTERN_API( OSErr )
  1517. MSAMPutRecipient                (MSAMParam *            paramBlock,
  1518.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0519, 0xAA5E);
  1519.  
  1520. EXTERN_API( OSErr )
  1521. MSAMPutContent                    (MSAMParam *            paramBlock,
  1522.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051A, 0xAA5E);
  1523.  
  1524. /*  SYNCHRONOUS ONLY */
  1525. EXTERN_API( OSErr )
  1526. MSAMPutEnclosure                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x051B, 0xAA5E);
  1527.  
  1528. EXTERN_API( OSErr )
  1529. MSAMPutBlock                    (MSAMParam *            paramBlock,
  1530.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051C, 0xAA5E);
  1531.  
  1532. EXTERN_API( OSErr )
  1533. MSAMPutMsgHeader                (MSAMParam *            paramBlock,
  1534.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051D, 0xAA5E);
  1535.  
  1536. /* Reports and Error Handling Glue Routines */
  1537. EXTERN_API( OSErr )
  1538. MSAMCreateReport                (MSAMParam *            paramBlock,
  1539.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051F, 0xAA5E);
  1540.  
  1541. EXTERN_API( OSErr )
  1542. MSAMPutRecipientReport            (MSAMParam *            paramBlock,
  1543.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0520, 0xAA5E);
  1544.  
  1545. EXTERN_API( OSErr )
  1546. PMSAMLogError                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0521, 0xAA5E);
  1547.  
  1548. /* MsgSummary Glue Routines */
  1549. EXTERN_API( OSErr )
  1550. PMSAMCreateMsgSummary            (MSAMParam *            paramBlock,
  1551.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0522, 0xAA5E);
  1552.  
  1553. EXTERN_API( OSErr )
  1554. PMSAMPutMsgSummary                (MSAMParam *            paramBlock,
  1555.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0525, 0xAA5E);
  1556.  
  1557. EXTERN_API( OSErr )
  1558. PMSAMGetMsgSummary                (MSAMParam *            paramBlock,
  1559.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0526, 0xAA5E);
  1560.  
  1561.  
  1562.  
  1563. #if PRAGMA_STRUCT_ALIGN
  1564.     #pragma options align=reset
  1565. #elif PRAGMA_STRUCT_PACKPUSH
  1566.     #pragma pack(pop)
  1567. #elif PRAGMA_STRUCT_PACK
  1568.     #pragma pack()
  1569. #endif
  1570.  
  1571. #ifdef PRAGMA_IMPORT_OFF
  1572. #pragma import off
  1573. #elif PRAGMA_IMPORT
  1574. #pragma import reset
  1575. #endif
  1576.  
  1577. #ifdef __cplusplus
  1578. }
  1579. #endif
  1580.  
  1581. #endif /* __OCEMAIL__ */
  1582.  
  1583.